<template>
	<view class="margin20 content  Row">
		<view class="item Row" @click="OnChangeChose('fenlei')">
			<text style="font-size: 32upx;" :class="chosetype == 'fenlei' ? 'activetype' : ''">{{ fenleiinfo }}</text>
			<image
				:src="
					chosetype == 'fenlei'
						? 'https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0350080567.png?tdsourcetag=s_pctim_aiomsg'
						: 'https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0721986826.png?tdsourcetag=s_pctim_aiomsg'
				"
			></image>
		</view>

		<view class="item Row" style="margin-left: 50upx;" @click="OnChangeChose('dist')">
			<text style="font-size: 32upx;" :class="chosetype == 'dist' ? 'activetype' : ''">{{ distinfo }}</text>
			<!-- <image src="../static/near/fujin@2x.png" ></image> -->
			<image
				:src="
					chosetype == 'dist'
						? 'https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0350080567.png?tdsourcetag=s_pctim_aiomsg'
						: 'https://mycar-image.oss-cn-shenzhen.aliyuncs.com/upload/image/2019/10/11/0721986826.png?tdsourcetag=s_pctim_aiomsg'
				"
			></image>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			fenleiinfo: '全部分类',
			distinfo: '附近(智能范围)',
			chosetype: 'none'
		};
	},
	methods: {
		settitle(type, titile) {
			if (type == 'fenlei') {
				this.fenleiinfo = titile;
			} else {
				this.distinfo = titile;
			}
			this.chosetype = 'none';
		},
		OnChangeChose(type) {
			this.$emit('OnChangeChose', type);

			// this.chosetype = type
		},
		settype(type) {
			this.chosetype = type;
		}
	}
};
</script>

<style>
.content {
	height: 80upx;
	align-items: center;
}
.item {
	/* width: 30%; */
	justify-content: space-between;
	align-items: center;
	color: #000000;
}
image {
	height: 50upx;
	width: 50upx;
	margin-left: 30upx;
}
.activetype {
	color: #55b9ff;
}
</style>
